<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<!--  <link rel="stylesheet" type="text/css" title="Design" href="design.css" />-->
		<link rel="stylesheet" type="text/css" title="Design" href="subres.css" />
		<title>Connexion</title>
		<script language="JavaScript"> <!-- debut du script

		function VerifierPasse(){
			alert("coolfbdvf");
		var comp =document.forms["form1"]["passe"].value;
		var compn =document.forms["form1"]["nom"].value;
	
		if(comp == compn && comp="" ){
		//window.location = " /ContactProjet/pages/accueil.jsp";
		document.forms["form1"].submit();
		}
		else
		{ alert(comp+"faux");
	  
		window.location = "main.jsp";
		}
		}
	
</script> 
		
		
		
		
	</head>
	
	<body>
	<form name="form1" id="monForm" method="post" action="login">
		<table>
			<tr>
				<th><h3>Voici un premier exemple de composant web avec un servlet</h3></th>
				<tr>
					<td><i>Name: <input type="text" name="name" size="25"></i></td>
				</tr>
				<tr>
					<td><i>Password: <input type="password" name="password" size="25"></i></td>
				</tr>
				<tr>
					<td><input class="button" type="submit" value="Submit" onClick="VerifierPasse()" /><input class="button" type="reset" value="Reset"></td>
				</tr>
			
		</table>
	</form>
		
		<form id="monForm" method="post" action="LoginJsp.jsp">
			<table>
				<tr>
					<th><h3>Et un second avec un jsp</h3></th>
				</tr> 
				<tr>
					<td><i>Name: <input type="text" name="name" size="25"></i></td>
				</tr>
				
				<tr>
					<td><i>Password: <input type="password" name="password" size="25"></i></td>
				</tr>
				<tr>
					<td><input class="button" type="submit" value="Submit"  onClick="VerifierPasse()"/> <input class="button" type="reset" value="Reset"></td>
				</tr>	
			</table>
		</form>
	</body>
</html>